/**
  * @description: 订单详情的地址模块
  * @author: yingying.fan
  * @date: 2019/3/8 14:37
  */
import React, { Component } from 'react'
import { StyleSheet, View, Text } from 'react-native'
import { px2dp } from 'rn-xiaobu-utils'

type Props = {
  orderInfo: Object
}
export default class AddrInfo extends Component<Props> {
  static defaultProps = {
    name: '',
    phone: '',
    detail: ''
  }

  constructor (props) {
    super(props)
    this.state = {}
  }

  render () {
    return (
      <View style={styles.addrModule}>
        <View style={styles.addrNameView}>
          <Text style={styles.addrName} numberOfLines={1}>
            {this.props.orderInfo.RECEIVER}
          </Text>
          <Text style={styles.addrPhone} numberOfLines={1}>
            {this.props.orderInfo.RECEIVE_TEL}
          </Text>
        </View>
        <Text style={styles.addrDetail} numberOfLines={1}>
          {this.props.orderInfo.RECEIVE_ADDR}
        </Text>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  addrModule: {
    height: px2dp(152),
    backgroundColor: '#ffffff',
    // marginTop: px2dp(16),
    paddingHorizontal: px2dp(30),
    paddingTop: px2dp(23),
    borderStyle: 'solid',
    borderColor: '#dddddd',
    borderBottomWidth: px2dp(1)
  },
  addrNameView: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'flex-end'
  },
  addrName: {
    color: '#333333',
    fontSize: px2dp(36)
  },
  addrPhone: {
    color: '#333333',
    fontSize: px2dp(30)
  },
  addrDetail: {
    color: '#999999',
    fontSize: px2dp(26),
    marginTop: px2dp(13)
  }
})